extends layout

block content
  h2 #{poll.text}
  br
  - if error_message
    p.text-danger #{error_message}
  form(action='/poll/#{poll.key}', method='post')
    - each ch in poll.choices
      .radio
        label(for='choice_#{ch.key}') #{ch.text}
        input(type='radio', id='choice_#{ch.key}', name='choice', value='#{ch.key}')
    br
    button.btn.btn-primary(type='submit') Vote
